<?php

use Illuminate\Database\Seeder;

class OrdersTableSeeder extends Seeder
{
    /**
     * Run the database seeds.
     *
     * @return void
     */
    public function run()
    {
        for($i=0;$i<100;$i++){
            DB::table('stock_orders')->insert([
                'stock_activity_id' => 1,
                'user_id' => rand(1,100),
                'money'=>rand(50,1000),
                'pay_money'=>rand(50,100),
                'stock_code'=>rand(100000,999999),
                'open_price'=>rand(1000,9999),
                'close_price'=>rand(5000,9999),
                'yield'=>rand(0.1,0.9),
                'out_trade_no'=>str_random(16),
                'transaction_id'=>str_random(16),
                'payment_time'=>time(),
                'status'=>1,
            ]);
        }
    }
}
